package com.wocao.mapper;

import com.wocao.entity.ZyOwnerRoom;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 * 房屋绑定表  Mapper 接口
 * </p>
 *
 * @author gyh
 * @since 2023-12-10
 */
public interface ZyOwnerRoomMapper extends BaseMapper<ZyOwnerRoom> {

    @Update("UPDATE zy_owner_room set room_status = 1 where owner_room_id = #{ownerRoomId}")
    //绑定成功
    void controlsOk(String ownerRoomId);

    @Update("UPDATE zy_owner_room set room_status = 2 where owner_room_id = #{ownerRoomId}")
    //绑定失败
    void controlsNo(String ownerRoomId);

    String getByuserId(String userId);
}
